import axiosData from "@/api/axios";

export default {
  /**
   * @description: 获取报废记录列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {} *
   * @return {Array}
   */
  queryPageList(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/scrapRecord/queryPageList",
      params
    );
  },
  /**
   * @description: 获取报废单个记录列表 *代表必填
   * @param {String} equipmentCode  *
   * @return {Array}
   */
  query(params) {
    return axiosData.get(
      `/v3/agricultural-equipment/v1/scrapRecord/query?equipmentCode=${params}`
    );
  },
  /**
   * @description:查询未报废的设备 *代表必填
   * @return {Array}
   */
  queryEquipment(params) {
    return axiosData.get(
      "/v3/agricultural-equipment/v1/scrapRecord/queryEquipment",
      params
    );
  },
  /**
   * @description:查询所有不是报废以及禁用的设备 *代表必填
   * @return {Array}
   */
  queryNotDiscardAndDisable(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/equipment/queryNotDiscardAndDisable",
      params
    );
  },
  /**
   * @description:根据设备类型编码查询未报废的设备 *代表必填
   * @return {Array}
   */
  queryByNotDiscard(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/scrapRecord/queryByNotDiscard",
      params
    );
  },
  /**
   * @description:查询所有启用的设备 *代表必填
   * @return {Array}
   */
  queryAllEnable(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/equipment/queryAllEnable",
      params
    );
  },

  /**
   * @description: 新增报废记录
   * @param {Object} params *
   * @return {Object}
   */
  add(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/scrapRecord/add",
      params
    );
  },
  /**
   * @description: 编辑报废记录
   * @param {Object} params *
   * @return {Object}
   */
  edit(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/scrapRecord/edit",
      params
    );
  },
  /**
   * @description: 批量删除报废记录
   * @param {Object} params *
   * @return {Object}
   */
  delList(params) {
    return axiosData.post(
      "/v3/agricultural-equipment/v1/scrapRecord/deleteAll",
      params
    );
  },
  /**
  * @description: 获取所有设备
  */
  queryAllEqu() {
    return axiosData.get("/v3/equipment-ledger/v1/equipment/queryAll");
  }
};
